Platform Explorer / Nuxeo Platform 2023.8

Extension point contextExtension

Documentation

Extension allowing to register a new ContentExtensionFactory that will be used to add custom objects inside the rendering context.

Contribution Descriptors

  • Class: org.nuxeo.template.api.descriptor.ContextExtensionFactoryDescriptor

Existing Contributions

Contributions are presented in the same order as the registration order on this extension point. This order is displayed before the contribution name, in brackets.

  • nuxeo-template-rendering-core-2023.8.13.jar /OSGI-INF/templateprocessor-contrib.xml
    <extension point="contextExtension" target="org.nuxeo.template.service.TemplateProcessorComponent">
    
        <documentation>
          Adds utility functions in the context
          <ul>
            <li>functions.getVocabularyTranslatedLabel(vocname, key, lang)</li>
            <li>functions.getVocabularyLabel(vocname, key)</li>
            <li>functions.getVocabularyLabel(vocname, key)</li>
            <li>functions.formatDate(calendar)</li>
            <li>functions.formatDateTime(calendar)</li>
            <li>functions.formatTime(calendar)</li>
            <li>functions.getNuxeoPrincipal(username)</li>
          </ul>
        </documentation>
    
        <contextFactory class="org.nuxeo.template.context.extensions.FunctionsExtensionFactory" name="functions">
         <aliasName>fn</aliasName>
         <aliasName>Fn</aliasName>
        </contextFactory>
    
      </extension>
  • nuxeo-template-rendering-core-2023.8.13.jar /OSGI-INF/templateprocessor-contrib.xml
    <extension point="contextExtension" target="org.nuxeo.template.service.TemplateProcessorComponent">
    
        <documentation>Adds audit infos in the context
          <ul>
            <li>auditEntries</li>
          </ul>
        </documentation>
    
        <contextFactory class="org.nuxeo.template.context.extensions.AuditExtensionFactory" name="auditEntries">
        </contextFactory>
    
      </extension>
  • nuxeo-template-rendering-core-2023.8.13.jar /OSGI-INF/templateprocessor-contrib.xml
    <extension point="contextExtension" target="org.nuxeo.template.service.TemplateProcessorComponent">
    
        <documentation>Adds Repository features in the context
          <ul>
            <li>core.getParent()</li>
            <li>core.getChildren()</li>
          </ul>
        </documentation>
    
        <contextFactory class="org.nuxeo.template.context.extensions.CoreExtensionFactory" name="core">
        </contextFactory>
    
      </extension>
  • nuxeo-template-rendering-jaxrs-2023.8.13.jar /OSGI-INF/templateprocessor-contrib.xml
    <extension point="contextExtension" target="org.nuxeo.template.service.TemplateProcessorComponent">
    
        <documentation>Adds helper function to manage REST resources urls
          <ul>
            <li>jaxrs.getResourceUrl(resourceName)</li>
          </ul>
        </documentation>
    
        <contextFactory class="org.nuxeo.template.jaxrs.context.ExtensionFactory" name="jaxrs">
        </contextFactory>
    
      </extension>